﻿// MyNotes - Free Sticky Notes
// Copyright (C) 2011 Alexandre Vicenzi
// 
// This program is free software; you can redistribute it and/or modify it under 
// the terms of the GNU General Public License as published by the Free Software 
// Foundation; either version 3 of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful, but WITHOUT 
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with 
// this program; if not, write to the Free Software Foundation, Inc., 
// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace MyNotes
{
    static class Configurations
    {
        private static string configFile = "MyNote.Config.xml";
        private static Font font;
        private static NoteColor colorNote;
        private static bool autoStartup;
        private static bool showInTasbar;
        private static bool showCalendar;
        private static bool autoUpdate;
        private static string lang;

        public static void LoadConf()
        {
            try
            {

            }
            catch
            {

            }
            LoadDefaulConfig();
        }

        public static bool SaveConf()
        {
            try
            {
                ParseXML.SaveUserConfigurations(configFile);
                return true;
            }
            catch
            {
                throw;
            }
        }

        public static void LoadDefaulConfig()
        {
            DefaultFont = new Font("Segoe Print", 11.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
            DefaultColorNote = NoteColor.Yellow;
            StartupWithSystem = true;
            ShowInTaskbar = false;
            ShowCalendar = false;
            AutoUpdate = false;
            AppLanguage = "ENU";
        }

        #region Fields

        public static string ConfigFileName
        {
            get { return configFile; }
        }

        public static Font DefaultFont
        {
            get { return font; }
            set { font = value; }
        }

        public static NoteColor DefaultColorNote
        {
            get { return colorNote; }
            set { colorNote = value; }
        }

        public static bool StartupWithSystem
        {
            get { return autoStartup; }
            set { autoStartup = value; }
        }

        public static bool ShowInTaskbar
        {
            get { return showInTasbar; }
            set { showInTasbar = value; }
        }

        public static bool ShowCalendar
        {
            get { return showCalendar; }
            set { showCalendar = value; }
        }

        public static bool AutoUpdate
        {
            get { return autoUpdate; }
            set { autoUpdate = value; }
        }

        public static string AppLanguage
        {
            get { return lang; }
            set { lang = value; }
        }

        #endregion
    }
}
